package cn.cimoc.mapper;

import cn.cimoc.model.po.TDictDistrict;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

/**
 * @author LGZ
 * @date 2022/7/16 15:12
 * <p>
 */
@Repository
public interface DistrictMapper extends BaseMapper<TDictDistrict> {
    /**
     * 根据code查询地名
     * @param code /
     * @return /
     */
    @Select("SELECT name FROM t_dict_district WHERE code = #{code}")
    String getNameByCode(@Param("code")String code);
}
